<!--#layout("/common/layout.html",{"jsBase":"/js/admin/dict/"}){ -->
<div>
	<div class="layui-btn-group" style="float: right">
		<layui:accessButton function="dict.add" action="add">增加</layui:accessButton>
		<layui:accessButton function="dict.delete" action="batchDel">批量删除</layui:accessButton>
	</div>
	<div style="float: left">
		<form id="searchForm" class="layui-form layui-form-pane" >
			<div class="layui-row">
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label" style="width: auto">字典类型</label>
						<div class="layui-input-inline">
							<select id="typeId" name="type" lay-filter="typeId">
								<option value="">请选择字典类型</option>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label" style="width: auto">字典值</label>
						<div class="layui-input-inline">
							<input type="text" name="value" class="layui-input"  placeholder="">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label" style="width: auto">字典名称</label>
						<div class="layui-input-inline">
							<input type="text" name="name" class="layui-input"  placeholder="">
						</div>
					</div>
					<div class="layui-inline">
						<button class="layui-btn " type="button" id="searchFormSearch">搜索</button>
						<button class="layui-btn layui-btn-primary" type="reset" id="searchFormClean">重置</button>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div style="clear: both"></div>
</div>
<table id="dictTable" lay-filter="dictTable"></table>
<!--#} -->
<script>
layui.use(['index'], function(){
  var index = layui.index;
  index.init();

});
$(document).ready(function () {
    $.ajax({
        timeout: 3000,
        async: false,
        type: "POST",
        url: Common.ctxPath +"/admin/dict/getDictTypeList.json",
        dataType: "json",
        success: function (data) {
            for (var i = 0; i < data.length; i++) {
                $("#typeId").append("<option value="+data[i].type+">" + data[i].typeName + "</option>");
            }
        }
    });
});
</script>
<script type="text/html" id="toobar">
	{{#  if(d.status!='2') { }}
	<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="enable">禁用</a>
	{{#  }else{ }}
	<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="enable">启用</a>
	{{#  } }}
	<a class="layui-btn layui-btn-xs"  lay-event="update">编辑</a>
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script type="text/html" id="indexTpl">
	{{d.LAY_TABLE_INDEX+1}}
</script>
